package types

type Table struct {
	Name             string
	ColumnPrimaryKey []string
	Columns          []Column
}
type Model struct {
	Name      string
	TableName string
	Fields    []Field
}

type Field struct {
	Name       string
	DbName     string
	Type       any
	DbType     int
	Comment    string
	PrimaryKey bool
}

type Column struct {
	Name    string
	Type    int
	Comment string
}

// Template 模板组
type Template struct {
	Key         string
	Name        string
	Description string
	Path        string
}

type FileInfo struct {
	Content  string `json:"content,omitempty"`
	Name     string `json:"name"`
	IsFile   bool   `json:"isFile"`
	IsFolder bool   `json:"isFolder"`
	Path     string `json:"path"`
	Readonly bool   `json:"readonly"`
}

func (f *FileInfo) SetContent(content string) {
	f.Content = content
}
